﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Xml.Linq;
using System.Linq;

namespace ArmoryBrowser.Entities.AchievementDetails
{
    public class Category
    {
        #region Fields
        private Achievement[] _achievementField;
        private Category[] _categoriesField;
        #endregion
        #region Properties
        public Achievement[] Achievement
        {
            get
            {
                return this._achievementField;
            }
            set
            {
                this._achievementField = value;
            }
        }

        public Category[] Categories
        {
            get
            {
                return this._categoriesField;
            }
            set
            {
                this._categoriesField = value;
            }
        }
        #endregion
        #region Constructor
        public Category(XElement element)
        {
            Categories = element.Elements("category").Select(e => new Category(e)).ToArray();
            Achievement = element.Elements("achievement").Select(e => new Achievement(e)).ToArray();
        }
        #endregion
    }
}
